/**
 * 该文件用于描述接口返回值的类型
 */

// 城市模块
export namespace City {
  // 单个城市
  export interface Item {
    cityId: number
    name: string
    pinyin: string
    isHot: 0 | 1
  }

  // 拼音分组对象
  export interface Group {
    title: string
    list: Item[]
  }

  // locate 返回值
  export interface LocateRes {
    city: Item
  }

  // list 返回值
  export interface ListRes {
    cities: Item[]
  }
}

// 电影模块
export namespace Film {
  // 单个电影
  export interface Item {
    filmId: number
    name: string
    grade: string
    poster: string
    showDate: number[]
    // ...
  }

  // 列表接口返回值
  export interface ListRes {
    films: Item[]
    total: number
  }
}

// 排期模块
export namespace Schedule {
  export interface Item {
    scheduleId: number
    advanceStopMins: number
    showAt: number
    endAt: number
    filmLanguage: string
    hallName: string
    imagery: string
    isOnsell: boolean
    marketPrice: number
    maxSalePrice: number
    minSalePrice: number
    salePrice: number
  }
}

// 影院模块
export namespace Cinema {
  // 单个影院
  export interface Item {
    Distance: number
    address: string
    businessTime: string
    cinemaId: number
    name: string
    cityId: number
    cityName: string
    district: {
      districtId: number
      name: string
    }
    districtId: number
    districtName: string
    eTicketFlag: number
    gpsAddress: string
    isVisited: number
    latitude: number
    longitude: number
    logoUrl: string
    lowPrice: number
    notice: string
    phone: string
    seatFlag: number
  }

  // 列表接口返回值
  export interface ListRes {
    cinemas: Item[]
  }

  // 详情接口返回值
  export interface InfoRes {
    cinema: Item
  }

  // 电影列表接口返回值
  export interface FilmListRes {
    films: Film.Item[]
  }

  // 排期接口返回值
  export interface ScheduleListRes {
    schedules: Schedule.Item[]
  }
}
